<?php
session_start();
include_once 'recursos/config.php';
$conf = new configuracion();
$dominio = $conf->getG2uDominio()."/";
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <title> :: Gift 2 You :: <?=$_SESSION["g2uUserName"]?></title>
        
        <link rel="shortcut icon" type="image/ico" href="<?=$dominio?>images/vineta-globo.png" />
        <link type="text/css" href="<?=$dominio?>css/g2u.css" rel="stylesheet"  media="screen" />
        <link type="text/css" href="<?=$dominio?>css/tipsy.css" rel="stylesheet"  media="screen" />
        
        <!--<link type="text/css" href="css/3d.css" rel="stylesheet"  media="screen" />-->
        <link type="text/css" href="<?=$dominio?>css/gallery.css" rel="stylesheet"  media="screen" />
        
        <!--SCROLL-->
        <link type="text/css" href="<?=$dominio?>css/jquery.mCustomScrollbar.css" rel="stylesheet"  media="screen" />
        
        <!-- ALERTA INICIO -->
        <link type="text/css" href="<?=$dominio?>css/jquery-ui.css" rel="stylesheet"  media="screen" />
        <!-- ALERTA FIN -->

        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/jquery-1.9.1.js"></script>
        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/g2u.js"></script>
        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/tipsy.js"></script>
        
        <!-- <script lang="javascript" type="text/javascript" src="js/3d.js"></script> 
        <script lang="javascript" type="text/javascript" src="js/gallery.js"></script> -->
        
        <!-- SCROLL -->
        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/jquery.mCustomScrollbar.js"></script>
        
        <!-- ALERTA INICIO -->
        <script src="<?=$dominio?>js/jquery-ui.js"></script>
        <script src="<?=$dominio?>js/floating.js"></script>

        <!-- ALERTA FIN -->
        <script>
            
            function getLocation(){
              if (navigator.geolocation){
                navigator.geolocation.getCurrentPosition(showPosition);
              }else{
                //alert("Geolocation is not supported by this browser.");
              }
            }
            
            function showPosition(position){
                $("#lat").val(position.coords.latitude);
                $("#long").val(position.coords.longitude);
                $("#acc").val(position.coords.accuracy);
            }
            
            function transition(){
                $("#uploadLoader").fadeOut(1500);
                $("#wishInnerBodyUpload").fadeOut(1500);
                $("#comentario").val("");
                $("#file").val("");
            }
            
            function loadWishList(){
                urlext = "loadUserWishList";
                $.post(urlext, function(data){
                    $("#capaWishList").html(data);
                });
            }
            
            function validarForm(){
                $("#uploadLoader").fadeIn(1500);
                $("#uploadForm").fadeOut(1500);
            }
        </script>
        
    </head>
    <body>
        <table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%; border-color: lightgray;" border="0">
            <tr>
                <td style="width: 20%; vertical-align: top;  ">
                    <div>
                        <center>
                            <img src="<?=$dominio?>images/logo.png"/>
                        </center>
                    </div>

                    <div>
                        <center>
                            <img id="ppicPortal" src="<?=$dominio.$_SESSION["g2uProfilePic"]?>" />
                            <img src="<?=$dominio?>images/png/salir.png" style="cursor: pointer;" onclick="logOut();"  width="18px" />
                            <br/>        
                            <?=$_SESSION["g2uFirstName"]?>
                        </center>
                    </div>
                    
                    <div id="menu">
                        <? include_once 'menu.php'; ?>
                    </div>
                    
                </td>
                <td style="width: 80%; vertical-align: top; padding-right: 100px; " >
                    <div id="fb-root"></div>
                    
                    <div id="contentBody">
                        
                        <div id="wishHead">
                            Wishlist
                        </div>
                        
                        <div id="wishBody">
                            <div id="wishInnerBody">
                                <table id="tableWishInnerBody" cellpadding="10px">
                                    <tr>
                                        <td id="tableWishInnerBodyPic" align="center">
                                            <img id="ppic" src="<?=$dominio?><?=$_SESSION["g2uFriendProfilePic"]?>" />
                                        </td>
                                        <td>
                                            <span id="userFullName"><?=$_SESSION["g2uFriendFirstName"]." ".$_SESSION["g2uFriendLastName"]?> </span>
                                        </td>
                                    </tr>
                                </table>
                                <div id="capaWishList">
                                <?
                                if (isset($_SESSION["dataWishList"]) && is_array($_SESSION["dataWishList"]) && !empty($_SESSION["dataWishList"])){
                                    include_once 'vista/vista.wishlist.php'; 
                                } else {
                                ?>
                                    <table id="wishInnerBodyList">
                                        <tr>
                                            <td>A&uacute;n no tiene elementos en su wishlist.</td>
                                        </tr>
                                    </table>
                                <?
                                }
                                ?>
                                </div>
                            </div>
                        </div>
                        
                    </div>
                </td>
            </tr>
        </table>

        <!-- PREVIEW IMG BLOCK -->
        <div id="photo_preview" style="display:none">
            <div class="photo_wrp" id="photo_wrp"></div>
        </div>
        <!-- PREVIEW IMG BLOCK -->

    </body>
</html>